home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / tiff256.zip / TIFF256.TXT < prev   
Text File  |  1992-07-06  |  25KB  |  884 lines

  1.  
  2.                 TIFF256
  3.                Graphics Library
  4.                   Extensions
  5.  
  6.               For C Programmers
  7.  
  8.                   Version 1.0
  9.                   July 6, 1992
  10.  
  11.  
  12.               Copyright Spyro Gumas, 1992.
  13.                All Rights Reserved
  14.  
  15.  
  16.  
  17.                     
  18. TIFF256 Graphics Library Extensions                      July 6, 1992
  19. Version 1.0
  20.  
  21. 1.0 Introduction                                        3
  22.       1.1 Some TIFF Insight                             3
  23. 2.0 The TIFF256 Extensions Environment                  4
  24.       2.1 Using The TIFF256 Extensions                  4
  25.       2.2 Support of TIFF 5.0                           4
  26.       2.3 Global Graphics Parameters                    7
  27. 3.0 TIFF256 Extensions Functionality                    8
  28.       3.1 Function Descriptions                         8
  29.         3.1.1 tf_open_file                          8
  30.         3.1.2 tf_close_file                         8
  31.         3.1.3 tf_get_file_info                      9
  32.         3.1.4 tf_skip_ifd                           9
  33.         3.1.5 tf_set_defaults                       10
  34.         3.1.6 tf_read_ifd                           11
  35.         3.1.7 tf_display_image                      12
  36.         3.1.8 tf_set_prime_colors                   12
  37.       3.2 Handling The Color Look Up Table              13
  38. 4.0 Nitty Gritties                                      14
  39.       4.1 Registration Information                      14
  40.       4.2 Software License                              14
  41.       4.3 Disclaimer                                    14
  42.       4.4 Technical Support                             15
  43. 5.0 Coming Attractions                                  16
  44. 6.0 Appendix                                            17
  45.       6.1 TIFF.H Include File                           17
  46.  
  47.                 
  48.                 
  49.                 
  50.                 
  51.                 
  52.                 
  53.                 
  54.                 
  55.                 Page: 2
  56.                     
  57. TIFF256 Graphics Library Extensions                      July 6, 1992
  58. Version 1.0
  59.  
  60. 1.0 Introduction
  61.  
  62.       The TIFF256 Extensions is a library of C routines which enhance 
  63. the VSA256 Graphics Library to provide a C programmer with the tools 
  64. necessary to display Tagged Image File Format (TIFF) images using a 
  65. video adapter running with the VESA BIOS Extensions, Version 2.0.  
  66. Support is provided for both Microsoft C and Borland C products.  The 
  67. name "TIFF256" reflects the fact that this library supports the 256 
  68. color video modes defined within the VESA standard.
  69.       The distribution of the TIFF256 Extensions consists of the 8 files 
  70. listed below.  These files are archived in the self extracting file 
  71. TIF256.EXE.  To extract, just type TIF256 in the directory that you want 
  72. the files extracted to.  When distributing the TIFF256 Extensions, 
  73. distribute TIF256.EXE instead of the individual files.
  74.  
  75. TIF_DEMO.C        Demonstration program (Source Code).
  76. TIF_DEMO.EXE      Demonstration program (Executable).
  77. TIF_DATA.EXE      TIFF file analysis program (Executable).
  78. TIFFMSL.LIB       TIFF256 Extensions, Large Memory Model (Microsoft C).
  79. TIFFBCL.LIB       TIFF256 Extensions, Large Memory Model (Borland C).
  80. TIFF.H            Include file required in your program.
  81. TIFF256.TXT       This text document.
  82. ORDER.TXT         A text file order form for upgrades and registration.
  83.  
  84. 1.1 Some TIFF Insight
  85.  
  86.       A TIFF file can contain one or more images.  Each of these images 
  87. is stored in the file as an "Image File Directory" (an IFD).  Each IFD 
  88. consists of numerous fields or "tags".  Each tag defines a particular 
  89. aspect of the image (ie. color model, width, length, resolution, etc.).  
  90. With the TIFF256 Extensions, a programmer can find out how many IFDs are 
  91. contained within a TIFF file, jump to the desired IFD, read all of the 
  92. tags within the IFD, and display the IFD's image. 
  93.  
  94.                 
  95.                 
  96.                 
  97.                 
  98.                 
  99.                 
  100.                 
  101.                 
  102.                 
  103.                 
  104.                 
  105.                 
  106.                 
  107.                 
  108.                 
  109.                 
  110.                 Page: 3
  111.                     
  112. TIFF256 Graphics Library Extensions                      July 6, 1992
  113. Version 1.0
  114.  
  115. 2.0 The TIFF256 Extensions Environment
  116.  
  117. 2.1 Using The TIFF256 Extensions
  118.  
  119.       The TIFF256 Extensions work with any (any?) IBM PC, XT, AT or  
  120. compatible computer equipped with an SVGA video adapter card capable of 
  121. 256 colors.  A math coprocessor chip is not required, however if it 
  122. exists, this library will take advantage of it.  The TIFF256 Extensions 
  123. are distributed as a Large Memory Model library for either Microsoft C 
  124. or Borland C.  If other memory models are required, contact me.
  125.       The TIFF256 Extensions are used in conjunction with the VSA256 
  126. Graphics Library Version 1.1 (Version 1.0 Won't Work, Find V1.1 in same 
  127. place you got TIFF256 Extensions).  The following discussion assumes 
  128. that you are adding TIFF capability to an existing program which already 
  129. uses the VSA256 Graphics Library.  To use the TIFF256 Extensions, add 
  130. the file TIFF.H to your C compiler's default directory for INCLUDE 
  131. files, add the statement:
  132.  
  133. #include<tiff.h>;
  134.  
  135. to your program, and add the file TIFFBCL.LIB or TIFFMSL.LIB to the list 
  136. of files that your program is linked with.
  137.  
  138. 2.2 Support of TIFF 5.0
  139.  
  140.       For the programmer familiar with the TIFF 5.0 Technical 
  141. Memorandum, the following list indicate which and to what degree the 
  142. defined tags are supported by the TIFF256 Extensions.  The tags 
  143. supported provide functionality with most images.  When in doubt, run 
  144. the provided TIF_DATA program to determine the characteristics of a 
  145. given TIFF file.
  146.  
  147.                 
  148.                 
  149.                 
  150.                 
  151.                 
  152.                 
  153.                 
  154.                 
  155.                 
  156.                 
  157.                 
  158.                 
  159.                 
  160.                 
  161.                 
  162.                 
  163.                 
  164.                 
  165.                 Page: 4
  166.                     
  167. TIFF256 Graphics Library Extensions                      July 6, 1992
  168. Version 1.0
  169.  
  170. TAGS SUPPORTED:
  171.  
  172. Basic Tags -
  173.         BitsPerSample = 8,8,8 (for RGB or True Color Images)
  174.         BitsPerSample <= 8 (for Bilevel, Grayscale, or Palette 
  175.         images)
  176.         ColorMap
  177.         Compression = none
  178.         ImageLength
  179.         ImageWidth
  180.         NewSubFileType
  181.         PhotometricInterpretation = Bilevel and Grayscale
  182.         PhotometricInterpretation = RGB (True Color)
  183.         PhotometricInterpretation = Palette Color
  184.         PlanarConfiguration = 1
  185.         ResolutionUnit
  186.         RowsPerStrip
  187.         SamplesPerPixel
  188.         StripByteCounts
  189.         StripOffsets
  190.         XResolution
  191.         YResolution
  192.  
  193. TAGS NOT SUPPORTED (Maybe Next Revision):
  194.  
  195. Basic Tags -
  196.         BitsPerSample != 8,8,8 (for RGB or True Color Images)
  197.         BitsPerSample > 8 (for Bilevel, Grayscale, or Palette 
  198.         images)
  199.         ColorResponseCurves
  200.         Compression = CCITT Group 3 1-Dimensional Modified Huffman 
  201.         RLE
  202.         Compression = LZW Compression
  203.         Compression = PackBits Compression
  204.         GrayResponseCurve
  205.         GrayResponseUnit
  206.         PhotometricInterpretation = Transparency Mask
  207.         PlanarConfiguration = 2
  208.         Predictor
  209.  
  210.                 
  211.                 
  212.                 
  213.                 
  214.                 
  215.                 
  216.                 
  217.                 
  218.                 
  219.                 
  220.                 Page: 5
  221.                     
  222. TIFF256 Graphics Library Extensions                      July 6, 1992
  223. Version 1.0
  224.  
  225. TAGS NOT SUPPORTED (continued):
  226.  
  227. Informational Tags -
  228.         Artist
  229.         DateTime
  230.         HostComputer
  231.         ImageDescription
  232.         Make
  233.         Model
  234.         Software
  235.  
  236. Facsimile Tags -
  237.         Group3Options
  238.         Group4Options
  239.  
  240. Document Storage and Retrieval Tags -
  241.         DocumentName
  242.         PageName
  243.         PageNumber
  244.         XPosition
  245.         YPosition
  246.  
  247. Obsolete Tags -
  248.         CellLength
  249.         CellWidth
  250.         FillOrder
  251.         FreeByteCounts
  252.         FreeOffsets
  253.         MaxSampleValue
  254.         MinSampleValue
  255.         SubFileType
  256.         Orientation
  257.         Thresholding
  258.  
  259.  
  260.                 
  261.                 
  262.                 
  263.                 
  264.                 
  265.                 
  266.                 
  267.                 
  268.                 
  269.                 
  270.                 
  271.                 
  272.                 
  273.                 
  274.                 
  275.                 Page: 6
  276.                     
  277. TIFF256 Graphics Library Extensions                      July 6, 1992
  278. Version 1.0
  279.  
  280. 2.3 Global Graphics Parameters
  281.  
  282.       The file TIFF.H is used as an include file during program 
  283. development.  This file includes all of the extension's function 
  284. prototypes and it defines the global parameters that describe the TIFF 
  285. File and individual IFDs.  The global graphics parameters are 
  286. initialized by the tf_get_file_info() and tf_read_ifd() functions and 
  287. are described below:
  288.  
  289. TF_Num_Ifd:             Unsigned, the number of IFDs in the TIFF file.
  290. TF_ImageWidth:          Unsigned long, the image width in pixels.
  291. TF_ImageLength:         Unsigned long, the image length in pixels.
  292. TF_BitsPerSample[3]:    Unsigned, the number of bits per sample.  For
  293.             Bilevel, grayscale, or Palette Color, pixel size 
  294.             = TF_BitsPerSample[0].  For True Color, pixel 
  295.             Red Component = TF_BitsPerSample[0], pixel Green 
  296.             component = TF_BitsPerSample[1], pixel Blue 
  297.             component = TF_BitsPerSample[2].
  298. TF_ResolutionUnit:      Unsigned, 1 = Not specified, 2 = Inch, 3 = 
  299.             Centimeter.
  300. TF_SamplesPerPixel:     Unsigned, the number of samples per pixel.
  301. TF_PhotometricInterpretation:Unsigned, 1 = Bilevel or Grayscale, 2 = RGB 
  302.             (True Color) image, 3 = Palette Color Image.
  303. TF_XResolution_int:     Unsigned long, the integral number of pixels in 
  304.             the x dimension per TF_Resolution Unit
  305. TF_XResolution_frac:    Unsigned long, the fractional number of pixels 
  306.             in the x dimension per TF_Resolution Unit
  307. TF_YResolution_int:     Unsigned long, the integral number of pixels in 
  308.             the y dimension per TF_Resolution Unit
  309. TF_YResolution_frac:    Unsigned long, the fractional number of pixels 
  310.             in the y dimension per TF_Resolution Unit
  311. TF_Black:         Unsigned, index into CLUT for color nearest to Black.
  312. TF_Red:           Unsigned, index into CLUT for color nearest to Red.
  313. TF_Orange:        Unsigned, index into CLUT for color nearest to Orange.
  314. TF_Yellow:        Unsigned, index into CLUT for color nearest to Yellow.
  315. TF_Green:         Unsigned, index into CLUT for color nearest to Green.
  316. TF_Aqua:          Unsigned, index into CLUT for color nearest to Aqua.
  317. TF_Blue:          Unsigned, index into CLUT for color nearest to Blue.
  318. TF_Violet:        Unsigned, index into CLUT for color nearest to Violet.
  319. TF_White:         Unsigned, index into CLUT for color nearest to White.
  320.  
  321.  
  322.                 
  323.                 
  324.                 
  325.                 
  326.                 
  327.                 
  328.                 
  329.                 
  330.                 Page: 7
  331.                     
  332. TIFF256 Graphics Library Extensions                      July 6, 1992
  333. Version 1.0
  334.  
  335. 3.0 TIFF256 Extensions Functionality
  336.  
  337.       This section describes the operation of the TIFF256 Extensions.  
  338. To use the functions in this library, compile your program using the 
  339. large memory model and link your program with the appropriate librarys 
  340. listed below depending on the compiler being used.
  341.  
  342.       Microsoft C or Quick C       -      VSA256MS.LIB and TIFFMSL.LIB
  343.       Borland C++ or Turbo C       -      VSA256BC.LIB and TIFFBCL.LIB
  344.  
  345. 3.1 Function Descriptions
  346.  
  347.       In the following sections each function is listed along with a 
  348. definition of its inputs and return values.  A description is provided 
  349. followed by any relevant comments.
  350.  
  351. 3.1.1 tf_open_file(filename)
  352.  
  353. Inputs:       char far filename[];
  354.  
  355. Returns:      int fail_flag;
  356.  
  357. Description:      This routine opens the TIFF file specified by the 
  358.     character string 'filename[]' for use by the TIFF256 
  359.     Extensions.  Only one file can be opened at a time.  The file 
  360.     is opened as 'Read Only'.  If the file is successfully opened, 
  361.     this routine returns a '0'.  Otherwise, it returns a '-1'.  
  362.     This routine must be called before calling tf_get_file_info().
  363.  
  364. Comments:      
  365.  
  366.  
  367. 3.1.2 tf_close_file()
  368.  
  369. Inputs:       Nothing
  370.  
  371. Returns:      Nothing
  372.  
  373. Description:      This routine closes the currently open TIFF file.  
  374.     This routine must be called before opening a new TIFF file with 
  375.     tf_open_file().  This routine should be called before exiting 
  376.     your program.
  377.  
  378. Comments:      
  379.  
  380.  
  381.                 
  382.                 
  383.                 
  384.                 
  385.                 Page: 8
  386.                     
  387. TIFF256 Graphics Library Extensions                      July 6, 1992
  388. Version 1.0
  389.  
  390. 3.1.3 tf_get_file_info()
  391.  
  392. Inputs:       Nothing
  393.  
  394. Returns:      int fail_flag;
  395.  
  396. Description:      This routine verifies that the selected file is a TIFF 
  397.     format file.  Then it initializes the TIFF256 environment for 
  398.     this file.  The global parameter 'TF_Num_Ifd' is set to the 
  399.     number of Image File Directories (IFDs) existing within the 
  400.     file.    An IFD is one 'picture', and multiple IFDs can exist 
  401.     within one TIFF file.  The TIFF file pointer is set to point to 
  402.     the first IFD in the file.  This routine is typically called 
  403.     after tf_open_file().  If an error occurs, this routine returns 
  404.     a 1, otherwise it returns a 0.
  405.  
  406. Comments:      
  407.  
  408.  
  409. 3.1.4 tf_skip_ifd(count)
  410.  
  411. Inputs:       unsigned count;
  412.  
  413. Returns:      int reached_end;
  414.  
  415. Description:      This routine moves the TIFF file pointer ahead 'count' 
  416.     IFDs. Typically, this routine is called after 
  417.     tf_get_file_info() to index the TIFF file pointer to the 
  418.     desired IFD.  For example, if tf_get_file_info() sets 
  419.     TF_Num_Ifd to 5, calling this routine immediately after 
  420.     tf_get_file_info() with 'count' = 3, will cause the TIFF file 
  421.     pointer to skip over the first 3 IFDs and point to the 4th IFD.  
  422.     If 'count' equals or exceeds the number of remaining IFDs, this 
  423.     routine returns a 1, and the TIFF file pointer is set to point 
  424.     to the last IFD.  Otherwise it returns a 0.
  425.  
  426. Comments:      
  427.  
  428.  
  429.                 
  430.                 
  431.                 
  432.                 
  433.                 
  434.                 
  435.                 
  436.                 
  437.                 
  438.                 
  439.                 
  440.                 Page: 9
  441.                     
  442. TIFF256 Graphics Library Extensions                      July 6, 1992
  443. Version 1.0
  444.  
  445. 3.1.5 tf_set_defaults()
  446.  
  447. Inputs:       Nothing
  448.  
  449. Returns:      Nothing
  450.  
  451. Description:      This routine sets the default values for all of the 
  452.     global parameters which are modified by TIFF 'Tags'.  TIFF 
  453.     files may not include data for all of the parameters used by 
  454.     the TIFF256 environment, and therefore the defaults should be 
  455.     set.  This routine should be called at the beginning of each 
  456.     new IFD, prior to calling tf_read_ifd().  The default values 
  457.     are listed below:
  458.  
  459.             TF_ImageWidth                   =      0
  460.             TF_ImageLength                  =      0
  461.             TF_BitsPerSample[0]             =      1
  462.             TF_BitsPerSample[1]             =      1
  463.             TF_BitsPerSample[2]             =      1
  464.             TF_ResolutionUnit               =      2
  465.             TF_SamplesPerPixel              =      1
  466.             TF_PhotometricInterpretation    =      1
  467.             TF_XResolution_int              =      300
  468.             TF_XResolution_frac             =      1
  469.             TF_YResolution_int              =      300
  470.             TF_YResolution_frac             =      1
  471.  
  472.  
  473. Comments:      
  474.  
  475.  
  476.                 
  477.                 
  478.                 
  479.                 
  480.                 
  481.                 
  482.                 
  483.                 
  484.                 
  485.                 
  486.                 
  487.                 
  488.                 
  489.                 
  490.                 
  491.                 
  492.                 
  493.                 
  494.                 
  495.                 Page: 10
  496.                     
  497. TIFF256 Graphics Library Extensions                      July 6, 1992
  498. Version 1.0
  499.  
  500. 3.1.6 tf_read_ifd()
  501.  
  502. Inputs:       Nothing
  503.  
  504. Returns:      int fail_flag;
  505.  
  506. Description:      This routine reads the data from the IFD currently 
  507.     pointed to by the TIFF file pointer.  The TIFF file pointer 
  508.     must be pointing to a valid IFD prior to calling this routine 
  509.     (This routine is typically called after tf_open_file() or 
  510.     tf_skip_ifd() which initialize the pointer).  After reading the 
  511.     data from the current IFD, the TIFF file pointer is set to 
  512.     point to the next IFD.  If the TIFF file pointer points to the 
  513.     last IFD in the TIFF file and this routine is executed, the IFD 
  514.     is read, and then the TIFF file pointer is set with a null 
  515.     value.  After calling this routine, tf_display_image can be 
  516.     called to display the IFD's image.  If an error occurs, or this 
  517.     routine is called with the TIFF file pointer set to a null 
  518.     value, fail_flag is returned set to '1', otherwise it is 
  519.     returned set to '0'.  The following global parameters are set 
  520.     by this routine:
  521.  
  522.             TF_ImageWidth
  523.             TF_ImageLength
  524.             TF_BitsPerSample[3]
  525.             TF_ResolutionUnit
  526.             TF_SamplesPerPixel
  527.             TF_PhotometricInterpretation
  528.             TF_XResolution_int
  529.             TF_XResolution_frac
  530.             TF_YResolution_int
  531.             TF_YResolution_frac
  532.             TF_Black
  533.             TF_Red
  534.             TF_Orange
  535.             TF_Yellow
  536.             TF_Green
  537.             TF_Aqua
  538.             TF_Blue
  539.             TF_Violet
  540.             TF_White
  541.  
  542. Comments:      
  543.  
  544.  
  545.                 
  546.                 
  547.                 
  548.                 
  549.                 
  550.                 Page: 11
  551.                     
  552. TIFF256 Graphics Library Extensions                      July 6, 1992
  553. Version 1.0
  554.  
  555. 3.1.7 tf_display_image(x0,y0)
  556.  
  557. Inputs:       Unsigned x0;
  558.           Unsigned y0;
  559.  
  560. Returns:      Nothing
  561.  
  562. Description:      This routine displays the image that is defined in the 
  563.     IFD read by the most recent call to tf_read_ifd().  The image 
  564.     is drawn with its top left corner at screen coordinates 
  565.     'x0,y0'.  The Color Look Up Table (CLUT) is not modified until 
  566.     this routine is executed.  When executed, this routine prepares 
  567.     the CLUT as defined by the IFD being displayed.  Before calling 
  568.     this routine, 'tf_read_ifd()' must be called to initialize all 
  569.     of the required parameters.
  570.  
  571. Comments:      This routine may be called more than once per 
  572.     'tf_read_ifd()' call.  Please DO NOT call this routine if 
  573.     'tf_read_ifd()' returns an error (return value = 1).
  574.  
  575.  
  576. 3.1.8 tf_set_prime_colors()
  577.  
  578. Inputs:       Nothing
  579.  
  580. Returns:      Nothing
  581.  
  582. Description:      This routine updates the prime color global 
  583.     parameters: TF_Black, TF_Red, TF_Orange, TF_Yellow, TF_Green, 
  584.     TF_Aqua, TF_Blue, TF_Violet, and TF_White.  It does this by 
  585.     scanning the CLUT and loading each parameter with the CLUT 
  586.     index for the brightest color nearest to the color specified by 
  587.     the parameter name.  This routine should be called following 
  588.     any operation which modifies the CLUT (such as tf_display_image).
  589.           The prime color global parameters are provided in an 
  590.     attempt to give the user access to a standard set of colors 
  591.     (for use with text, borders, etc.) regardless of CLUT 
  592.     operations.  However, the color must exist in the CLUT for this 
  593.     routine to find it.
  594.  
  595. Comments:      
  596.  
  597.                 
  598.                 
  599.                 
  600.                 
  601.                 
  602.                 
  603.                 
  604.                 
  605.                 Page: 12
  606.                     
  607. TIFF256 Graphics Library Extensions                      July 6, 1992
  608. Version 1.0
  609.  
  610. 3.2 Handling The Color Look Up Table
  611.  
  612.       The TIFF256 Extensions supports Bilevel and 8 bit or less 
  613. Grayscale (TF_PhotometricInterpretation = 1), 24 bit True Color 
  614. (TF_PhotometricInterpretation = 2) and 8 bit or less Palette Color 
  615. (TF_PhotometricInterpretation = 3) image types.  Since this library is 
  616. specifically designed for 256 entry Color Look Up Tables (CLUTs), for 
  617. True Color images, the Red, Green, and Blue color components are 
  618. compressed to 8 bit pixels consisting of 3 bits Red, 3 bits Green, and 2 
  619. bits Blue, and the CLUT is loaded with a compressed True Color table.  
  620. For Palette color images, the IFD comes with its own values which are 
  621. directly loaded into the CLUT.  Regardless of image type, the CLUT is 
  622. not loaded until tf_display_image is called, even though the IFD may 
  623. have already been read by tf_read_ifd().  This means that the previously 
  624. loaded CLUT (typically from previously displayed IFD) remains in force 
  625. until tf_display_image() is called.
  626.  
  627.  
  628.                 
  629.                 
  630.                 
  631.                 
  632.                 
  633.                 
  634.                 
  635.                 
  636.                 
  637.                 
  638.                 
  639.                 
  640.                 
  641.                 
  642.                 
  643.                 
  644.                 
  645.                 
  646.                 
  647.                 
  648.                 
  649.                 
  650.                 
  651.                 
  652.                 
  653.                 
  654.                 
  655.                 
  656.                 
  657.                 
  658.                 
  659.                 
  660.                 Page: 13
  661.                     
  662. TIFF256 Graphics Library Extensions                      July 6, 1992
  663. Version 1.0
  664.  
  665. 4.0 Nitty Gritties
  666.  
  667. 4.1 Registration Information
  668.  
  669.       If you find the TIFF256 Extensions useful, a registration of $20 
  670. would be appreciated.  If you register, you will receive a diskette and 
  671. manual for the next upgrade of the software (see Section 5.0 Coming 
  672. Attractions).
  673.  
  674.       Please state the version number of the software you are 
  675. presently using.  Send check or money order to:
  676.  
  677.             Spyro Gumas
  678.             1668 Shady Brook Drive
  679.             Fullerton, Ca. 92631
  680.  
  681. 4.2 Software License
  682.  
  683. TIFF256 Extensions, Version 1.0
  684. Copyright Spyro Gumas, 1992.  All Rights Reserved.
  685.  
  686. You are free to copy and distribute the TIFF256 Extensions if:
  687.  
  688. 1)      It is used strictly for non-commercial purposes.
  689. 2)      No fee is charged for use, copying or distribution.
  690. 3)      It is not modified in any way.
  691.  
  692.       Clubs and user groups may charge a nominal fee not to exceed ($10) 
  693. for expenses and handling while distributing the TIFF256 Extensions.
  694.  
  695.       Site licenses and commercial licenses for the TIFF256 Extensions 
  696. are available.  Consult the file ORDER.TXT for more information, or 
  697. contact me for more information.
  698.  
  699. 4.3 Disclaimer
  700.  
  701.       This software is provided "as is".  All warranties relating to 
  702. this software are disclaimed, whether expressed or implied, including 
  703. without limitation any implied warranties of merchantability or fitness 
  704. for a particular purpose.  Neither the author nor an agent of the author 
  705. will be liable for any special, incidental, consequential, indirect or 
  706. similar damages due to loss of data or any other reason, even if the 
  707. author or an agent of the author has been advised of the possibility of 
  708. such damages.  In no event shall the author's or an agent of the 
  709. author's liability for any damages ever exceed the price paid for the 
  710. license to use software, regardless of the form of the claim.  The 
  711. person using the software bears all risk as to the quality and 
  712. performance of the software.
  713.  
  714.  
  715.                 Page: 14
  716.                     
  717. TIFF256 Graphics Library Extensions                      July 6, 1992
  718. Version 1.0
  719.  
  720. 4.4 Technical Support
  721.  
  722.       If you have any questions or comments about the TIFF256 
  723. Extensions, please write me at:
  724.  
  725.             Spyro Gumas
  726.             1668 Shady Brook Drive
  727.             Fullerton, Ca. 92631
  728.  
  729.  
  730.                 
  731.                 
  732.                 
  733.                 
  734.                 
  735.                 
  736.                 
  737.                 
  738.                 
  739.                 
  740.                 
  741.                 
  742.                 
  743.                 
  744.                 
  745.                 
  746.                 
  747.                 
  748.                 
  749.                 
  750.                 
  751.                 
  752.                 
  753.                 
  754.                 
  755.                 
  756.                 
  757.                 
  758.                 
  759.                 
  760.                 
  761.                 
  762.                 
  763.                 
  764.                 
  765.                 
  766.                 
  767.                 
  768.                 
  769.                 
  770.                 Page: 15
  771.                     
  772. TIFF256 Graphics Library Extensions                      July 6, 1992
  773. Version 1.0
  774.  
  775. 5.0 Coming Attractions
  776.  
  777.       This stuff is shareware.  In an attempt to actually make make money 
  778. with shareware, I have to have something that you want (I'm an optimist).  
  779. To this end, I offer TIFF256 Extensions Version 2.0.
  780.       Version 2.0 of the TIFF256 Extensions incorporates TIFF FILE WRITING 
  781. capabilities so that you can generate a TIFF file of any image you generate 
  782. or modify using the VSA256 Graphics Library.   Version 2.0 also supports 
  783. some additional TIFF Tags while preserving compatibility with the previous 
  784. version.  With the $20 registration fee, you will automatically receive this 
  785. upgrade.  Some of the Version 2.0 new TIFF features are:
  786.  
  787. TIFF File Writing Capability
  788.  
  789. Basic Tags -
  790.     ColorResponseCurves
  791.     GrayResponseCurve
  792.     GrayResponseUnit
  793.     PlanarConfiguration = 2
  794.  
  795. Informational Tags -
  796.     Artist
  797.     DateTime
  798.     HostComputer
  799.     ImageDescription
  800.     Make
  801.     Model
  802.     Software
  803.  
  804. Document Storage and Retrieval Tags -
  805.     DocumentName
  806.     PageName
  807.     PageNumber
  808.     XPosition
  809.     YPosition
  810.  
  811.                 
  812.                 
  813.                 
  814.                 
  815.                 
  816.                 
  817.                 
  818.                 
  819.                 
  820.                 
  821.                 
  822.                 
  823.                 
  824.                 
  825.                 Page: 16
  826.                     
  827. TIFF256 Graphics Library Extensions                      July 6, 1992
  828. Version 1.0
  829.  
  830. 6.0 Appendix
  831.  
  832. 6.1 TIFF.H Include File
  833.  
  834. /*................................. TIFF.H ................ 5-30-92 ........*/
  835. /* This file declares the TIFFLB library functions and global parameters    */
  836. /* used throughout the graphics routines.                                   */
  837. /*                                                                          */
  838. /*            Copyright Spyro Gumas, 1992.  All Rights Reserved.            */
  839. /*..........................................................................*/
  840.  
  841.  
  842. /*..........................................................................*/
  843. /*                          Function Prototypes                             */
  844. /*..........................................................................*/
  845. int  _far _cdecl tf_open_file(char _far *);
  846. void _far _cdecl tf_close_file(void);
  847. int  _far _cdecl tf_get_file_info(void);
  848. int  _far _cdecl tf_skip_ifd(unsigned);
  849. void _far _cdecl tf_set_defaults(void);
  850. int  _far _cdecl tf_read_ifd(void);
  851. void _far _cdecl tf_display_image(unsigned,unsigned);
  852. void _far _cdecl tf_set_prime_colors(void);
  853.  
  854. /*..........................................................................*/
  855. /*                          Parameter Declarations                          */
  856. /*..........................................................................*/
  857.  
  858. unsigned long TF_ImageWidth, TF_ImageLength;
  859. unsigned TF_BitsPerSample[3],TF_Num_Ifd;
  860. unsigned TF_ResolutionUnit,TF_SamplesPerPixel;
  861. unsigned TF_PhotometricInterpretation;
  862. unsigned long TF_XResolution_int,TF_XResolution_frac;
  863. unsigned long TF_YResolution_int,TF_YResolution_frac;
  864. unsigned TF_Black,TF_Red,TF_Orange,TF_Yellow,TF_Green;
  865. unsigned TF_Aqua,TF_Blue,TF_Violet,TF_White;
  866.  
  867.  
  868.                 
  869.                 
  870.                 
  871.                 
  872.                 
  873.                 
  874.                 
  875.                 
  876.                 
  877.                 
  878.                 
  879.                 
  880.                 Page: 17
  881.  
  882.  
  883.  
  884.